package com.lagou.controller;

import com.lagou.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/email")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/email/{email}/{code}")
    public boolean findDefaultResumeState(@PathVariable String email, @PathVariable String code) {
        return emailService.findDefaultResumeByUserId(email, code);
    }
}
